package jeons.lately.biz.impl;

import java.util.List;

import jeons.lately.biz.LatelyBiz;
import jeons.lately.dto.LatelyDTO;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.ibatis.SqlMapClientTemplate;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@Transactional
public class LatelyBizImpl extends SqlMapClientDaoSupport implements LatelyBiz{
	@Autowired SqlMapClientTemplate sqlMapClientTemplate;
	@Override
	public void insertData(LatelyDTO latelyDTO) {
		sqlMapClientTemplate.insert("Lately.insertData", latelyDTO);
		
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<LatelyDTO> getList(String sessionid) {
		return sqlMapClientTemplate.queryForList("Lately.getList", sessionid);
	}

	@Override
	public void deleteData(String sessionid) {
		sqlMapClientTemplate.delete("Lately.deleteData", sessionid);
		
	}

}
